package com.maisonliberte.util;

import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class JSoupUtil {

	public static Element getTagElementByDivClass(Document doc, String className, String tagName){
		Elements ems = doc.getElementsByClass(className);
		if(ems.size() > 0){
			Elements ems_ = ems.get(0).getElementsByTag(tagName);
			if(ems_.size() > 0){
				return ems_.get(0);
			}
		}
		return null;
	}
	
	public static Elements getTagElementsByDivClass(Document doc, String className, String tagName){
		Elements ems = doc.getElementsByClass(className);
		if(ems.size() > 0){
			Elements ems_ = ems.get(0).getElementsByTag(tagName);
			return ems_;
		}
		return null;
	}
	

}
